package com.lx.testdemo;

public class recursiontest {
    public static void main(String[] args) {
        int i = fn(12);
        System.out.println(i);
        int number = 1;
        int j = fn1(10);
        System.out.println(j);
    }

    private static int fn1(int day) {
        if(day>11||day<0)
        {
            System.out.println("天数错误");
        }
        if(day==10)
        {
            return 1;
        }
        else
        {
            return (fn1(day+1)+1) * 2;
        }
    }

    private static int fn(int i) {
        if(i<3)
        {
            return 1;
        }
        else
        {
            return fn(i-2)+fn(i-1);
        }

    }
}
